package test.fanxin.clases;

public class GenericGoods<T>  
{  
    private T t;  
    private String information;  
    /** 
     * Description: default constructor. To get an object of the generic class 
     */  
    public GenericGoods(T oT)  
    {  
        this.t = oT;  
    }  
  
    /** 
     * @param sBrand: brand of the goods 
     * @param sName: name of the goods 
     * @param sPrice: price of the goods 
     * Description: set the data for the object  
     */  
    public void setData(String sBrand, String sName, String sPrice)  
    {  
        this.information = "This " + sName + " of " + sBrand + " costs "  
                + sPrice + "!";  
    }  
    public String getClassType()  
    {  
        return t.getClass().getName();  
    }  
//省略了set/get方法 

	public T getT() {
		return t;
	}

	public void setT(T t) {
		this.t = t;
	}

	public String getInformation() {
		return information;
	}

	public void setInformation(String information) {
		this.information = information;
	}
    
    
}  
